class Solution:
    def generate(self, numRows: int) -> list:
        if numRows == 0:
            return []
        res = [[1]]
        for i in range(1, numRows):
            res.append([1, 1])
            for j in range(1, i):
                res[i].insert(j, res[i-1][j-1] + res[i-1][j])
        return res


a = Solution()
print(a.generate(1))
print(a.generate(2))
print(a.generate(3))
print(a.generate(4))
print(a.generate(5))
